<!DOCTYPE html>
<html lang="zh-CN">
<head>
<include file="Public:header" />
</head>
<body>
<include file="Public:body_top" />

<div class="container-fluid">
  <div class="row">
    <div class="col-sm-3 col-md-2 sidebar hidden-xs">
      <div class="menu">
        <dl>
          <dt><i class="cm-order"></i>用户管理</dt>
          <dd class="active"><a href="{:U('Users/index')}">用户列表</a></dd>
        </dl>
      </div>
    </div>
    <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
      <div class="main-hd">
        <h5>用户列表</h5>
      </div>
      <div class="main-bd">

        <form method="post" action="{:U('Users/index')}" class="form-horizontal form-box clearfix">
          <div class="col-md-3">
            <div class="form-group">
              <label class="col-sm-4 control-label">选择类型</label>
              <div class="col-sm-8">
                <div class="select-type">
                  <select class="form-control" name="types">
                    <option value="" <eq name="types" value="">selected</eq>  >不限类型</option>
                    <option value="0" <eq name="types" value="0">selected</eq>>普通用户</option>
                    <option value="1" <eq name="types" value="1">selected</eq>>商户用户</option>
                  </select>
                </div>
              </div>
            </div>
          </div>
          <div class="col-md-3">
            <div class="form-group">
              <label class="col-sm-4 control-label">用户名</label>
              <div class="col-sm-8">
                <input class="form-control" name="nickname" type="text" placeholder="输入用户名" value="{$nickname}">
              </div>
            </div>
          </div>
          <div class="col-md-3">
            <button type="submit" class="btn btn-primary">查询</button>
          </div>
        </form>
        <div class="table-responsive">
          <table class="table table-cmcm">
            <tr>
              <th>用户号</th>
              <th>头像</th>
              <th>昵称</th>
              <th>电话</th>
              <th>类型</th>
              <th>创建时间</th>
            </tr>
            <volist name="page_list.list" id="vo">
              <tr>
                <td>{$vo.id}</td>
                <td>
                  <notempty name="vo.avatar">
                    <a title="查看头像" href="{$vo.avatar}" target="_blank">
                <img src="{$vo.avatar}" style="width:40px; height:40px;"></a>
                  </notempty>
                </td>
                <td>{$vo.nickname}</td>
                <td>{$vo.phone}</td>
                <td>{$vo.type_str}</td>
                <td>{$vo.created_at}</td>
              </tr>
            </volist>
          </table>
        </div>

        <ul class="pagination pull-right">
          <li>
            <a href="{$page_list.page.first.href}" aria-label="Previous">
                <span aria-hidden="true">&laquo;</span>
              </a>
          </li>
          <li>
            <a href="{$page_list.page.front.href}" aria-label="Previous">
                <span aria-hidden="true">&lt;</span>
              </a>
          </li>
          <volist name="page_list.page.list" id="plist">
            <li <eq name="plist.index" value="1">class="active"</eq>><a href="{$plist.href}">{$plist.page}</a></li>
          </volist>

          <li>
            <a href="{$page_list.page.after.href}" aria-label="Next">
                <span aria-hidden="true">&gt;</span>
              </a>
          </li>
          <li>
            <a href="{$page_list.page.last.href}" aria-label="Next">
                <span aria-hidden="true">&raquo;</span>
              </a>
          </li>
        </ul>
      </div>
    </div>
  </div>
</div>
</body>
</html>